#ifndef _GPS
#define _GPS

#define MAXLINE 300


typedef struct gga_s
{
	char time[10];
	
	char latitude[10];
	char indicateur_latitude[2];

	char longitude[10];
	char indicateur_longitude[2];

	char fix[2];

	char nb_sat[3];

	char altitude[5];
}gga_t;

typedef struct gps_s
{
	int fd;
	char data[MAXLINE];

	gga_t telemetry;
}gps_t;

gps_t open_gps(char *path);

int read_gps(gps_t *g);

void close_gps(gps_t *g);


#endif
